package nowcoder.day_48.day9;

import java.util.Scanner;

public class Num1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()){
            int n = in.nextInt();
            System.out.println(isPrime(n));

        }

    }
    public static boolean isPrime(int n){
        for(int i = 2 ; i < n ;i++){
            if(n % i == 0){
                return false;
            }
        }
        return true;
    }

}
